package mltpackage;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;

public class MbrowserTest {
	private WebDriver instance;
	@Parameters("browser")
	@BeforeTest
public void init(String browser)
{
		if(browser.equalsIgnoreCase("firefox"))
		{
			
			instance = new FirefoxDriver();
		}
			else if(browser.equalsIgnoreCase("chrome"))
			{
				System.setProperty("webdriver.chrome.driver", "C:\\gimii\\chromedriver.exe");
				instance = new ChromeDriver();
			}
			else if(browser.equalsIgnoreCase("ie"))
			{
				System.setProperty("webdriver.ie.driver", "C:\\gimii\\IEDriverServer.exe");
				instance = new InternetExplorerDriver();
			}
			else 
			{throw new IllegalArgumentException("this browser is not here");
			};
			instance.get("http://www.mrm.bz");
}
@Test
public void navigatto()
{
	WebElement ele = instance.findElement(By.id(""));
	
	if(ele.getText()=="")
	{
		System.out.println("pass");
		
	}
	else
	{
		System.out.println("failed");
		
	}
	
}
@AfterTest
public void cleanUp()
{
	//instance.quit();
}
}
